package com.st.sprinbootevent.listener;

import com.st.sprinbootevent.event.CustomEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

 
/**
 * @author zhangli
 */
@Component
public class AnnotationListener {
	
	@EventListener
	public void onApplication(CustomEvent event) {
		String source = (String) event.getSource();
		System.out.println(this.getClass().getSimpleName()+"监听到："+source);
	}
}